Re: [CentOS] iptables questionson CentOS

2008-12-09 Thread linux-crazy
Hi, If you want to allow one ip to access one destination then you can write the below rule in iptables. iptables -t nat -A POSTROUTING -s 192.168.101.230 -d centosip -j MASQUERADE iptables -t nat -A POSTROUTING -d 192.168.101.230 -s centosip -j MASQUERADE For remianing ip you can write a

Re: [CentOS] iptables questionson CentOS

2008-12-05 Thread Indunil Jayasooriya
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.101.230 -j SNAT --to-source 1.2.3.4 -d www.centos.org Any idea to achieve it? The destination should be before the SNAT ... so try this: iptables -t nat -A POSTROUTING -o eth0 -s 192.168.101.230 -d www.centos.org -j SNAT --to-source

[CentOS] iptables questionson CentOS

2008-12-04 Thread Indunil Jayasooriya
Hi, I know these are a few iptbales questions. NOT CentOS, anyway, I am running a firewall on centos 5.x. If you can response, it would be fine. I want to add a SNAT rule for one user in LAN to access one particular destination on the internet. Let's say www.centos.org I added the below

Re: [CentOS] iptables questionson CentOS

2008-12-04 Thread Barry Brimer
I want to add a SNAT rule for one user in LAN to access one particular destination on the internet. Let's say www.centos.org I added the below rule. But . it does NOT work Pls assume 1.2.3.4 is the real ip of the firewall. ip address 192.168.101.230 is the client PC iptables -t nat -A

Re: [CentOS] iptables questionson CentOS

2008-12-04 Thread Robert Spangler
On Thursday 04 December 2008 04:21, Indunil Jayasooriya wrote: Hi, I know these are a few iptbales questions. NOT CentOS, anyway, I am running a firewall on centos 5.x. If you can response, it would be fine. I want to add a SNAT rule for one user in LAN to access one particular