Sunday, July 24, 2011
[netscreen] configure nat
Monday, June 06, 2011
nat disabled after kernel update (xen)
Iptables problem
Trying to start iptables gives :
iptables v1.3.5: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Trying to “modprobe iptables” also gives an error message :
FATAL: Could not load /lib/modules/2.6.18-53.1.6.el5xen/modules.dep: No such file or directory
Here what I did to fix the problem:
- yum install kernel-xen kernel-xen-devel
- /sbin/depmod
After that, /sbin/iptables -L now works correctly!
ref: http://blog.jphoude.qc.ca/2007/11/17/xen-troubleshooting-centos-5/
found reference for openvz: http://thelinuxnoob.com/linux/enable-nat-module-for-vps-can%E2%80%99t-initialize-iptables-table-nat%E2%80%99-table-does-not-exist/
Friday, April 01, 2011
finally - NAT server works!
#--------------------------------------------------------------- # Load the NAT module # # Note: It is best to use the /etc/rc.local example in this # chapter. This value will not be retained in the # /etc/sysconfig/iptables file. Included only as a reminder. #--------------------------------------------------------------- modprobe iptable_nat #--------------------------------------------------------------- # Enable routing by modifying the ip_forward /proc filesystem file # # Note: It is best to use the /etc/sysctl.conf example in this # chapter. This value will not be retained in the # /etc/sysconfig/iptables file. Included only as a reminder. #--------------------------------------------------------------- echo 1 > /proc/sys/net/ipv4/ip_forward #--------------------------------------------------------------- # Allow masquerading # - Interface eth0 is the internet interface # - Interface eth1 is the private network interface #--------------------------------------------------------------- iptables -A POSTROUTING -t nat -o eth0 -s 192.168.1.0/24 -d 0/0 \ -j MASQUERADE #--------------------------------------------------------------- # Prior to masquerading, the packets are routed via the filter # table's FORWARD chain. # Allowed outbound: New, established and related connections # Allowed inbound : Established and related connections #--------------------------------------------------------------- iptables -A FORWARD -t filter -o eth0 -m state \ --state NEW,ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -t filter -i eth0 -m state \ --state ESTABLISHED,RELATED -j ACCEPT
Thursday, March 31, 2011
NAT made easy
Simple Firewall Creator module released
Thanks to Manny Fernandez for open-sourcing a new module for easily creating firewalls on Linux and FreeBSD systems, using pre-built blocks of rules and services. You can download it from itsecure-firewall.wbm.gz, and install it in Webmin at Webmin Configuration ->Webmin Modules.
Thank you for developer. :)
Sunday, March 27, 2011
forward NAT rules
By default, the IPv4 policy in Red Hat Enterprise Linux kernels disables support for IP forwarding, which prevents boxes running Red Hat Enterprise Linux from functioning as dedicated edge routers. To enable IP forwarding, run the following
sysctl -w net.ipv4.ip_forward=1 |