RE: iptables configuration help
"Alistair Francis" <ali-QGBN+/qDeXgGFrCMPLEOK/d9D2ou9A/[email protected]> Fri, 5 Nov 2004 14:50:40 +0200
| Newsgroups | gmane.comp.security.firewalls.smoothwall.general |
|---|---|
| Message-ID | <[email protected]> |
>Hello, > >I have added two sub interfaces to the external ethernet interface of Smoothwall. >There are 2 machines on the internal LAN and I want them to go out using the IP of the sub interface, >i.e access the internet using the exteral IP's. they should not have any restrictions by Smoothwall. >How can do this and what IP Tables rules should I add ? > >I have done the following : > >iptables -A INPUT -s 172.16.0.119 -d 0.0.0.0/0.0.0.0 -j ACCEPT >iptables -I FORWARD -s 172.16.0.119 -j ACCEPT >iptables -t nat -I POSTROUTING -s 172.16.0.119 -o eth1:0 -j SNAT --to-source <external_ip> > >When I addded the rules iptables gave me an error stating :" Weird character in interface eth0:0, no ! : " >Where am I going wrong ? Are sub interface allowed in iptables ? > >Kindly help. > >Vijay Kumar. _______________________________________________ Hi Vijay, I may be wrong but it looks to me as if what you are trying to do is effectively open up two machines to any inbound traffic from the internet. If I'm right, why would you want to do that? If you just want to have the two machines go out on different ip's then, I think, all you need is: /sbin/iptables -t nat -A POSTROUTING -p tcp -s 172.16.0.119 -j SNAT --to-source <place_external_ip_here> at the bottom of your rc.firewall.up That way the firewall is still protecting the network from inbound traffic but the specified machines will go out with the specified IP's. Provided you've set up the additional external IP's already. There is no restriction on traffic from GREEN going out. I could be wrong :) Rgds, Alistair Francis _______________________________________________ gpl mailing list [email protected] http://lists.smoothwall.org/mailman/listinfo/gpl SmoothWall Stash - Buy Our Stuff! http://cafepress.com/smoothwall