SliTaz SliTaz Forum

You are not logged in.

#1 2013-12-17 23:18:30

Enira
Member
Registered: 2012-07-11
Posts: 8

iptables won't work

I installed iptables in Slitaz, however my traffic isn't being routed to eth0. I am trying to capture incoming traffic and routing it to eth0.

My local.sh script:

# ip port forwarding

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Anyone any idea what's going wrong?

Offline

#2 2013-12-18 00:08:25

gdesilva
Member
Registered: 2011-04-07
Posts: 419

Re: iptables won't work

I suspect you would need to edit the /etc/firewall.conf...

Offline

#3 2013-12-18 00:18:07

mojo
Administrator
Registered: 2011-03-29
Posts: 2,173

Re: iptables won't work

eth0 is the WAN or internet connected ethernet card.

You have to setup a second ethernet card for the LAN side.

Follow the Internet Connection Sharing tutorial:

http://forum.slitaz.org/topic/internet-connection-sharing/page/2

Offline

#4 2013-12-18 10:21:57

Enira
Member
Registered: 2012-07-11
Posts: 8

Re: iptables won't work

@mojo, yeah the traffic is normally being routed to tun0 (OpenVPN) so it needs to go to eth0. Thanks for the link though.

@gdesilva, might think along those lines. Is the firewall.conf file by default enabled and/or restricting?

Concerning OpenVPN: All traffic gets sucked in to the VPN and an IP is assigned correctly. The client is giving 'me a thumbs up' and don't show any bizarre logs. So I am assuming that everything works as it should. If anyone has some troubleshooting which I could verify that OpenVPN is working as it should on Slitaz. Kindly appreciated.

Thanks in advance guys,

Offline

#5 2013-12-20 00:18:58

gdesilva
Member
Registered: 2011-04-07
Posts: 419

Re: iptables won't work

@Enira, my knowledge on this is limited - all I know is that when I installed iptables, I had to edit /etc/firewall.conf to get the rules working. Sorry, cannot shed more light on this.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.019 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]