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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux