Networking Forums

Networking Forums > Computer Networking > Linux Networking > dual ethernet and portforwarding

Reply
Thread Tools Display Modes

dual ethernet and portforwarding

 
 
Lance Miller
Guest
Posts: n/a

 
      03-02-2004, 03:16 PM
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:50A: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:50A: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
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      03-04-2004, 04:00 AM
Lance Miller <(E-Mail Removed)> 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
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
Reply

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Ethernet / Teaming? Chris LeFebvre Windows Networking 2 10-23-2008 06:38 PM
Dual Ethernet cards is there a HOWTO for this? The Eighth Doctor Linux Networking 3 11-10-2005 03:16 AM
Dual ethernet ports, one IP address Hoshisato Linux Networking 4 07-23-2005 11:14 PM
Trouble with dual pcmcia ethernet cards JoseA30468 Linux Networking 1 12-27-2003 11:52 AM
Dual Port ethernet NIC Available? Don Enderton Windows Networking 14 12-15-2003 03:22 AM



1 2 3 4 5 6 7 8 9 10 11