Discussion Locked

How to use new iptables style in 2.4?

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

The kernel 2.4 has been compiled without support
1) ipfwadm (2.0 ? style support) and
2) ipchains (2.2 ?style support).
How to do below:
ipchains ?P forward DENY
ipchains ?A forward ?i ppp0 ?j MASQ
use iptables?

1 reply

by santtu

iptables -P FORWARD ACCEPT
iptables -A FORWARD -i ppp0 -m state --state NEW,INVALID -j REJECT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward

The first line sets up the forwarding allowing you to use the computer as a gateway, the next blocks any forwards that
come from our internet connection. The third line enables IP Masquerade for anything going out on ppp0, and finally the last line actually enables forwarding.
This might do the trick you're looking for..

This discussion is closed to new replies.