LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NAT with single NIC in fedora (https://www.linuxquestions.org/questions/linux-newbie-8/nat-with-single-nic-in-fedora-637194/)

sandylinux 04-22-2008 11:03 PM

NAT with single NIC in fedora
 
How to do the NAT with single NIC in fedora core

archtoad6 04-23-2008 06:58 AM

Welcome to LQ.

I'm afraid your Q makes no sense to me as it is currently phrased. In fact, it occurred to me to ask you back, "How does one do NAT with a single NIC?" Of course, I wouldn't be referring to the internals on FC4, but rather the network layout. My point is that NAT as I know it requires the source & the destination to be separate. Please explain your situation, a network diagram would be nice.

2 points about your choice of distro:[list] [*] FC4 is way out of date. [*] FC anything is for testing, RHEL or CentOS should be used for (most) servers. [list]

scheidel21 04-24-2008 04:35 AM

I don't know if this helps, but perhaps you are thinking about maybe running a proxy? You can run a proxy server of your box and then your browser connects to that instead of directly through your internet connection.

edong23 05-03-2008 01:42 PM

Code:

ifconfig eth0:1 up
ifconfig eth0:1 192.168.0.1 netmask 255.255.255.0
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -o eth0 -j MASQUERADE


? i dontknow, havent tried it, but seemslike it would work.. you could also specify eth0:1 in the iptables rules for better seperation. ip is layer 3 so shouldnt have a problem with both interfaces being on the same nic.


All times are GMT -5. The time now is 11:31 PM.