Forum

Full Version: Iptables Problem please help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have a problem. I will make a accesspoint with the xbian. I will connect with the iPad over WLAN to the xbian. This is no problem. I habe make the Settings in the Interface. Have Install hastapd And isc-dhcp-Server And config it. I can connect to the xbian over WLAN with the iPad.

But now i will become the Internet Connection on the eht0 to the WLAN devices.

But wenn i make : iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

It's Not work. Can any Guy help me . Sorry My english is very very bad...
(11th Jul, 2013 05:24 AM)Trax Wrote: [ -> ]But wenn i make : iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

It's Not work. Can any Guy help me . Sorry My english is very very bad...

even if you MASQuerade or SNAT the one public IP, still the packets are going through "forward" chain so this one needs to be allowed like:

iptables -A forward -i wlan0 -o eth0 -j ACCEPT (don't know if I still remember the syntax right).

also, ipv4 forwarding needs to be activated on the xbian via /proc - or sysctl command (sysctl -w net.ipv4.ip_forward=1).

check /etc/sysctl.conf … it is disabled by default.

so three checks to go:
1) forwarding enabled in kernel
2) forwarding enabled for the specific interfaces and chains in iptables
3) proper MASQ, or SNAT, or DNAT set.
Reference URL's