Results 1 to 6 of 6
How do i format my ipchains command to accept syslog messages on port 504 but to redirect them to another local port, for example 1002??
is it somethinglike this??
Code:
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-31-2003 #1Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
iptables/ipchains syntax?
How do i format my ipchains command to accept syslog messages on port 504 but to redirect them to another local port, for example 1002??
is it somethinglike this??
Code:ipchains -C input -p tcp -y -i eth0 -s 192.168.1.1 504 -d 192.168.1.1 1002
Regards
Andutt
- 07-31-2003 #2Linux Newbie
- Join Date
- Apr 2003
- Location
- UK, Manchester
- Posts
- 147
iptables -t nat -A PREROUTING -p tcp -s <ip address/range> -d <ip addess> --dport 504 -j REDIRECT --to-port 1002
That will work for iptables, I am not sure if it would be similar for ipchains.
- 07-31-2003 #3Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
Thanks a lot....i will try that.
Regards
Andutt
- 07-31-2003 #4Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
How can i see that this chain is enabled?? With iptables -L -n i only see..
Which is standard right??Code:Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
Regards
Andutt
- 07-31-2003 #5Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
When i check the module with lsmod it looks like this though..
Code:ip_tables 15096 5 [ipt_REDIRECT iptable_nat iptable_filter]
Regards
Andutt
- 07-31-2003 #6Linux Newbie
- Join Date
- Apr 2003
- Location
- UK, Manchester
- Posts
- 147
You need to specify the table.
iptables -L -t nat


Reply With Quote
