Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got an adsl usb-modem web access and I want to share it on my lan...
I've used some iptables rules (copy pasted from the web) to create a 'standard' nat and it looks nice ! any web IP is reacheable from my lan but not the names...
I firstly thought port 53 dns requests will be forward like everything here... but apparently not
Then I tried to use a 'cache' dns server on my nat server but even that, (and even the fact that on debian package, bind is a cache dns server by default) nothing...
I feel like a lost cowboy at the end of my command line, please help.
so (first, nice: you're my fisrt answer on this forum)
resolv.conf server : the dns IPs of my ISP (free.fr)
nameserver 212.27.39.1
nameserver 212.27.39.2
for my IP address, I've something strange since a new card (it's a laptop), it doesn't state automatically, I put it by hand (but no dhcp)
I do only: ifconfig eth0 192.168.0.222 netmask 255.255.255.0 and my local network is ok
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS -o ppp0 --clamp-mss-to-pmtu
I repeat that I'm able to ping any web IP from the lan
I probably forget a little stupid detail (as usual)
do you know why dns packets don't go through my nat server (but the others, yes)
sorry for the late... I had a without linux week end
it's working properly now but I don't know why.
I havent' add any rule in my iptables
the problem source was perhaps inside the routing table (I'm not sure because I thought I had done it last time)
each time I boot, after lauching the web connection, I have to do:
route del default (to remove a default line going through 192.168.0.254)
route add default ppp0
and then it's working properly
an other question now: how can I fix it at boot ? (the routes)
I've notice strange things in my configuration... I have a DHCP server on the same machine (only to set gateway and dns) but theses 'client attributes' have been change automatically ?!? from a static IP to a dynamic name.... ISP ? or linux ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.