Re: Network Routing

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

 



On Tue, Apr 14, 2009 at 8:03 AM, Thom Paine <painethom@xxxxxxxxx> 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@xxxxxxxxxx
> 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

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux