iptables rules and lan network
Hello,
first please excuse my bad English writing skills!
I have a problem with iptables, i want to setup rules for my local server in a way that little weird please bear with me on it and any help will be appreciated
here is what i want to do but unfortunately i couldn't do myself
I want to allow access to my local server from LAN users only, and i also want to disable my server from making any communication to outside world and allow the server only to talk to the same LAN users, and i also want to allow the server to speak with one website
i treid to use these rules but no luck :(
# allow local access
iptables -A INPUT -s 127.0.0.1/32 -p tcp -j ACCEPT
iptables -A INPUT -s 192.168.1.0/25 -p tcp -j ACCEPT
iptables -A OUTPUT -s 192.168.1.0/25 -p tcp -j ACCEPT
# outside lan network server:
iptables -A OUTPUT -s 62.215.102.22 -p tcp -j ACCEPT
# deny everything else
iptables -A INPUT -p tcp -j DROP
iptables -A INPUT -p udp -j DROP
iptables -A OUTPUT -p tcp -j DROP
iptables -A OUTPUT -p udp -j DROP
any help will be appreciated
Thanks
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Kise A. for more information if necessary.