LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   configuring a server as a router to a wireless connection (https://www.linuxquestions.org/questions/slackware-14/configuring-a-server-as-a-router-to-a-wireless-connection-4175665095/)

apolinsky 11-28-2019 12:27 PM

configuring a server as a router to a wireless connection
 
I have not been successful as configuring a computer to act as a dhcp server for the lan, and at the same time a router to allow the lan computers to use the wireless connection from the server. The lan based computers get addresses, and can talk to one another, but a traceroute from those computers shows that traffic stops at the server. When I was in an area with good Internet connectivity, I had no problems with to task, but now in a rural area, with only cell phone connectivity with the phone being turned into a wireless access point and the server connecting to it, only the sever retains connectivity.

abga 11-28-2019 02:10 PM

From the short description, I guess the IP Forwarding is not enabled and you could've configured the NAT wrong (iptables), or no NAT at all.

Please provide details about your setup:
- Slackware version
- output of the following commands:
Code:

/usr/sbin/ip addres show
/usr/sbin/ip route show
/usr/bin/cat /proc/sys/net/ipv4/ip_forward
/usr/sbin/iptables -vnL

There are a few HowTo's already available for a Gateway setup under Slackware:
https://docs.slackware.com/howtos:mi...uick_and_dirty
https://docs.slackware.com/howtos:ha...spberrypi3_wap
https://docs.slackware.com/howtos:ne..._slackware_box

And a recent thread dedicated on the subject:
https://www.linuxquestions.org/quest...ay-4175659159/
With a sample firewall you can use and adapt:
https://www.linuxquestions.org/quest...ml#post6044000

apolinsky 11-28-2019 03:19 PM

Thank you so much. The only thing I had forgotten was to enable the masquerading in my iptables. everything else was fine. The computer is running Slackware14.2

Chuck56 11-29-2019 09:32 AM

Quote:

Originally Posted by apolinsky (Post 6062846)
Thank you so much. The only thing I had forgotten was to enable the masquerading in my iptables. everything else was fine. The computer is running Slackware14.2

Did you add something like this to your firewall?
Code:

/usr/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
If yes then congrats! Time to mark the thread as "Solved"!


All times are GMT -5. The time now is 03:04 PM.