Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15th April 2009, 07:18 PM
pessimist Offline
Registered User
 
Join Date: Nov 2005
Posts: 19
I can't make iptables forward a port.

I'm obviously losing my marbles here. I'm running a fully updated F10 installation with the LTSP system installed on top. I want to use squid as a transparent proxy and so wish to forward port 80 to port 3128.

I've produced a (very) cut down script to initialise iptables as follows;

Quote:
iptables -F
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 3128 -j ACCEPT
iptables -L
The output is as follows:

Quote:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:squid

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
i.e. the forward doesn't happen. I had hair at the beginning of the day, I now have little left I'm obviously doing something stoopid but I haven't a clue what.

Anyone any ideas?
Reply With Quote
  #2  
Old 15th April 2009, 07:47 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
I think the third rule should say FORWARD not INPUT
Reply With Quote
  #3  
Old 15th April 2009, 08:04 PM
pessimist Offline
Registered User
 
Join Date: Nov 2005
Posts: 19
I think you're right. My brain hurts. Thank you!
Reply With Quote
Reply

Tags
forward, iptables, make, port

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to forward a port using iptables Mantis Servers & Networking 9 8th May 2009 05:22 AM
iptables FORWARD problem cyanid3 Security and Privacy 6 20th July 2005 03:18 PM


Current GMT-time: 07:55 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat