nating problem
hi i am aa linux administrator and i am using fedora core 5 my problem is i can't to make nating in my server so that my lan can access the internet i have 2 nics the first eth0 in connected to the dsl
the second eth1 is conneced the my local network in linux can access the internet but the local network can't do it help me plz thank you in advance |
You need to add an iptables rule to do NATing, eg
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE This works for dynamic ip numbers.. For static ip numbers, eg iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source yr.ip.num.ber |
The other hosts on the network need the eth1 IP address value for the default gateway as well.
|
nating problem
my eth0 is 62.241.153.147
eth1 192.168.1.1 my router 62.241.153.145 after i made the iptables role for nating i can access the internet and my local network can ping eth0,eth1,the router and can ping any host on the internet with the ip only but couldn't ping the host with the name and when i make command: nslookup in any windows he can't find the name server for the ip 192.168.1.1 thank you |
Cool..
Now you need to add the dns servers for your isp into /etc/resolv.conf Enjoy! |
nating problem
my /etc/resolve.conf
search my.domin.com nameserver 192.168.1.1 |
It looks like you need the ip numbers for ns1 & ns2..
Code:
peter ~ # dig -x 62.241.153.147 |
nating problem
i added the ns1 and ns2 ips but still not working
|
nating problem
thank you peter
the problem is solved and the internet now is working very good again i really appreciate your help |
All times are GMT -5. The time now is 01:57 PM. |