Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Iptables Problem please help!
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Iptables Problem please help!
11th Jul, 2013, 05:24 AM
Post: #1
Trax Offline
Registered
Posts: 1
Joined: Jul 2013
Reputation: 0
Iptables Problem please help!
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...
Find all posts by this user
Quote this message in a reply
15th Jul, 2013, 02:26 PM
Post: #2
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Iptables Problem please help!
(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.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 09:02 PM Powered By MyBB, © 2002-2025 MyBB Group.