This is a discussion on dual ethernet and portforwarding within the Linux Networking forums, part of the Linux Forums category; I am having troube with portforwarding. I am using Redhat 9 with a custom kernal. I want my linux box ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am having troube with portforwarding. I am using Redhat 9 with a
custom kernal. I want my linux box to sit inbetween the router and switch, and to filter all 80 request to a cache server, and forward the rest of the rest of the ports out the Internet Swich ---------------> Eth0 ------------- -> Eth1-------------> Router I have the following options compiled in the kernel: Network support Sysctl Suport Network Packet Filtering TCP/IP networking Connection Tracking IP Tables support Full Nat Redirect target support /proc filesystem support On startup I have I a custom starting the port forward command with echo 1 > /proc/sys/net/ipv4/ip_forward The interfaces look like this [root@marfa root]# ifconfig eth0 Link encap:Ethernet HWaddr 00:50:DA:5D:07:92 inet addr:89.11.5.204 Bcast:89.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2102 errors:0 dropped:0 overruns:1 frame:0 TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:224339 (219.0 Kb) TX bytes:441 (441.0 b) Interrupt:9 Base address:0x4000 eth1 Link encap:Ethernet HWaddr 00:50:DA:C3:FB:7C inet addr:89.11.5.205 Bcast:89.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2040 errors:0 dropped:0 overruns:0 frame:0 TX packets:104 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:214588 (209.5 Kb) TX bytes:10333 (10.0 Kb) Interrupt:10 Base address:0x4080 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:700 (700.0 b) TX bytes:700 (700.0 b) And the route table looks like this: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 89.0.0.0 * 255.0.0.0 U 0 0 0 eth1 89.0.0.0 * 255.0.0.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 89.0.0.99 0.0.0.0 UG 0 0 0 eth0 Any Ideas on why this isn't working? Thanks in advance!!!! -Lance |
|
|||
|
Lance Miller <lance@blackfoot.net> wrote:
> I am having troube with portforwarding. I am using Redhat 9 with a > custom kernal. > > I want my linux box to sit inbetween the router and switch, and to > filter all 80 request to a cache server, and forward the rest of the > rest of the ports out the Internet In that case, all you need is a simple Swicth -- (Eth0 -- PROXY -- Eth1) -- Router iptables -t nat -A PREROUTING -i eth0 -p tcp \ --dport 80 -j REDIRECT --to-port 3128 You also need to tell squid that its acting as a transparent proxy. See the Squid User Guide for more information. http://squid-docs.sourceforge.net/la...tml/c2519.html -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |