Results 1 to 1 of 1
Running ubuntu 8.04.
Recently I was making some iptables rules to allow samba services. As a proof of concept:
Code:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables ...
- 10-21-2008 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 84
iptables -p udp and -m udp
Running ubuntu 8.04.
Recently I was making some iptables rules to allow samba services. As a proof of concept:
The rules worked properly. I then removed the "-m udp" part, restarted my windows machine and couldn't look at samba files.Code:iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -i eth1 -p udp -m udp --dport 137 -m state --state NEW -j ACCEPT iptables -A INPUT -i eth1 -p udp -m udp --dport 138 -m state --state NEW -j ACCEPT iptables -A INPUT -i eth1 -p tcp --dport 139 -m state --state NEW -j ACCEPT iptables -A INPUT -i eth1 -p tcp --dport 445 -m state --state NEW -j ACCEPT iptables -P INPUT DROP
I thought that "-p tcp" implied "-m tcp", so why doesn't "-p udp" imply "-m udp". That's why I don't have "-m tcp" on all of my rules.
I understand that "various extra command line options become available, depending on the specific module", Man page of IPTABLES, but I thought all you needed to match a protocol was "-p".


Reply With Quote
