LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   masquerading (internet connection sharing) on slackware13 (https://www.linuxquestions.org/questions/slackware-14/masquerading-internet-connection-sharing-on-slackware13-772865/)

vinnie_vinodh 12-02-2009 01:30 AM

masquerading (internet connection sharing) on slackware13
 
Hello
I have a desktop running slackware 13 and a laptop running freebsd(testing). Now i need to share the internet connection with the laptop as well. My ISP gave a router with four port and one port is directly connected to my slackware box . I've configured pppoe setup with (1) standalone . Before that i've configured pppoe-setup with (2)
masquerading, but its not allowing me to browse or get anything even though the connection is made .
While using fedora i used to use firestarter to masquerade but firestarter takes huge cpu processing power and memory .It made my f10 box hang .

As i've got only one router with three additional ports free i think
need to configure my router first .Do i have to configure the iptables or setting the pppoe-setup with (2) masquerading will do the job .
Any additional configuration do i need to make ????

Thanks in Advance.

uppman 12-02-2009 03:12 AM

Quote:

Originally Posted by vinnie_vinodh (Post 3776645)
Hello
I have a desktop running slackware 13 and a laptop running freebsd(testing). Now i need to share the internet connection with the laptop as well. My ISP gave a router with four port and one port is directly connected to my slackware box .

You would need something like this on the desktop, assuming eth0 has the internet connection:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

The laptop (which I assume is also connected to the router) needs to use the desktop as gateway. I don't know about freebsd so can't give any details there.

/Magnus

Woodsman 12-02-2009 02:00 PM

Basically:

If you are trying to connect the laptop to the web through the Slackware box, then on the Slackware box be sure to enable /etc/rc.d/rc.ip_forward. That startup script will do what uppman suggested during every (re)boot. The Slackware box would need an additional network card (one to connect to the router and one to the laptop).

If you are trying to connect the laptop directly through the router, then configure the laptop to look for a gateway at the router's local ip address. The router should be configured to provide network address translation. In Slackware the gateway is configured in the /etc/rc.d/rc.inet1.conf file. I don't where this is done in BSD. :(

This presumes the router is actually a router and not a switch. :)

vinnie_vinodh 12-03-2009 12:36 AM

Quote:

Originally Posted by Woodsman (Post 3777495)
Basically:

If you are trying to connect the laptop to the web through the Slackware box, then on the Slackware box be sure to enable /etc/rc.d/rc.ip_forward. That startup script will do what uppman suggested during every (re)boot. The Slackware box would need an additional network card (one to connect to the router and one to the laptop).

If you are trying to connect the laptop directly through the router, then configure the laptop to look for a gateway at the router's local ip address. The router should be configured to provide network address translation. In Slackware the gateway is configured in the /etc/rc.d/rc.inet1.conf file. I don't where this is done in BSD. :(

This presumes the router is actually a router and not a switch. :)

Thank You Mr.Woodsman

Router is provided by the ISP i'm subscribed to and i've tested with
Firestarter in fedora and connected it to an xp system .It worked ...later it hung my f10 box that's different anyway(less ram).So i dont want to use firestarter because its hungry even with 512 mb ram ...
I also tested it (the router ) with all xp systems long back with ICS and it worked. As you have said i need to configure the router ...

vinnie_vinodh 12-03-2009 01:57 PM

The laptop (which I assume is also connected to the router) needs to use the desktop as gateway. I don't know about freebsd so can't give any details there.


In freebsd you can assign by using sysinstall and configuring the network in "post configuration ".

Thank You so much its workin but i'm not able to understand the real configuration of ip tables or net tables ....
can you please help me with this ??
i want to learn but found it hard (iptables )
where can i get the appropriate in depth guide to learn ip tables


All times are GMT -5. The time now is 07:50 AM.