[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

ipchains problem

I try to implement IP Masquerading on my Linux box but I recieved error message "can only set policy in built-in chains" whenever I try to run command "/sbin/ipchains -P foward DENY" or "/sbin/ipchains -A foward -j MASQ -s 192.168.0.0/24 -d 0.0.0.0/0
0
shamsulbas
Asked:
shamsulbas
1 Solution
 
jchatfieldCommented:
Should be "forward", not "foward".  'ipchains -P forward DENY' is accepted on my masquerading system.

0
 
biardCommented:
duh
0
 
mdgreen7Commented:
This works for me:

/sbin/ipchains -A forward -s 192.168.0.0/24 -j MASQ
0
 
Sandy KalugdanSystems AdministratorCommented:
make sure your ipchains is installed correctly.

edit the file /etc/rc.d/rc.local put this at the bottom. so ip masquerading with activate at boot time.

ipchains -P forward DENY
ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0/0
echo "1" > /proc/sys/net/ipv4/ip_forward

save the file, exit then reboot your system

observe at the messages while booting.  If no error message appeard regarding ipchains, you're up and ready to masq

Sandy
mis@startrans.com.ph
0
 
Sandy KalugdanSystems AdministratorCommented:
Additional information.

192.168.1.0 is the class I used with my network.  you should replace this with the one that you installed with your own.

Goodluck!

Sandy
mis@startrans.com.ph
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now