source port
Hi,
I'm using iptables. i need to create a rule for specific IP, that all traffic to this IP will go from specific source PORT. it is possible ? for example: tcp 0 0 192.168.50.82:22 192.168.50.159:3057 ESTABLISHED I need that port 3057 will be constant for this ip 192.168.50.159 |
please anyone....
any ideas ?? |
Per the LQ Rules, please do not bump your own thread until at least 24 hours have elapsed without a reply. Because the LQ membership is global, people in other time zones may not have seen this post yet, and thus it may take some time before a response is received.
http://www.linuxquestions.org/rules.php |
Quote:
if i understand the question correctly - Code:
iptables -I INPUT -p tcp -s 192.168.50.159 --sport 3057 -d 192.168.50.82 --dport 22 -j ACCEPT |
Your explanation is a little hard to follow.
Code:
iptables -t nat -A POSTROUTING -p tcp --source 192.168.50.159/32 -j SNAT --to-source 192.168.50.159:3057 |
All times are GMT -5. The time now is 06:31 AM. |