[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Network Routing



On Tue, Apr 14, 2009 at 8:03 AM, Thom Paine <painethom gmail com> wrote:
> I have a server with 3 nics in it.
> eth0 is local lan
> eth1 is public internet
> eth2 is private
>
> I have most of the routing working in that I can send and receive
> traffic that I need on the private network from the server, but not on
> the workstations. I am using iptables for my firewalling, and have the
> route statements based on IP's for the eth2 interface and this works
> from the server. The default gateway is the eth1 interface.
>
> On the workstations, I need to be able to route out the eth2 interface
> of the server when I need a specific webpage. I'm thinking I need to
> add an iptables statement to my firewall to get that to work from the
> workstations, but I can't figure out how to do it.
>
> Basically, if I type www.site.com in a web browser on a workstation,
> it needs to hit eth2 on the server and get that page.
>
> Anyone know how to do that? Am I even on the right track?
>
> Thanks.
>
> --
> -=/>Thom
>
> --
> fedora-list mailing list
> fedora-list redhat com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
>

/sbin/iptables  -t nat --flush
/sbin/iptables  -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -d 0/0
-j MASQUERADE

where 192.168.2.0/24 should match your subnet address

this works for me, I'm not including the other rules to choke ports.

-- gary


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]