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.
You can execute this on the box that has the modem (server). I have read that this is not the best way to do it, but it will enable you to connect in the meantime. just change the xxx.xxx.xxx.xxx to the internal IP of the machine to be masq'd (or the client) You can use this to masq several machines too, just duplicate the command changing the IP.
'ipchains -A forward -i ppp0 -s xxx.xxx.xxx.xxx/0 -j MASQ'
iptables is the new version of ipchains, thats all. ipchains works for me just fine. Just use ipchains for now and you can investigate the use of iptables at your leisure The command listed above will happily masq any traffic going out to the internet from the IP address you specify. This works fine on my setup, I have a linux server that the alcatel adsl modem is connected to, and I dual boot the client machine with windoze and linux both of which can access the inet throught the server.
# full access to eth0 nic
iptables -A INPUT -p ALL -i eth0 -s $LAN_SUB -j ACCEPT
iptables -A OUTPUT -p ALL -s $LAN_SUB -j ACCEPT
iptables -A FORWARD -i eth0 -d 0/0 -p all -j ACCEPT
iptables -t nat -A POSTROUTING -p all -d 0/0 -s 0/0 -j SNAT --to-source $INET_IP1
That is the basic setup. The rest of the script is the firewall setup. YOu will have to mod it some to make it work with your connection.
You will need to change the LAN addresses to match your machines, and it looks like bbenz3 is connecting with PPPoE, we connect with PPPoA so change eth1 to ppp0.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.