- This topic has 1 reply, 2 voices, and was last updated Jul 27-1:31 pm by Dave.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › General › Tips and Tricks › iptables on antix 17.4.1
Tagged: iptable, Networking
I am setting up some firewall rules, but am unable to use a simple point to point network when using iptables. On the Linux side eth0 has a static IP of 192.168.10.22. That port is directly hooked up to a simple appliance that has the IP of 192.168.20.120, just a point to point.
I can ping the device and the app on Linux can talk with it fine. Once I load iptable rules I am blocked. If I flush all the rules, the port is still unusable. Below are some of the iptable rules I tried:
sudo iptables -F
sudo iptables -P INPUT DROP
sudo iptables -A INPUT -i eth2 -p tcp –dport 22 -j ACCEPT
sudo iptables -A INPUT -i eth2 -p tcp –dport 9734 -j ACCEPT
sudo iptables -A INPUT -i eth2 -p tcp –dport 48005 -j ACCEPT
sudo iptables -A INPUT -i eth0 -p tcp –dport 9800 -j ACCEPT
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT
Not 100% sure, I am quite rusty with manually setting ip tables.
I think you will need to specify the master INPUT DROP after all the other entries, otherwise it will be the first to match and always drop.
Also I am not sure what services you are using, but if I recall correctly for SSH (based on the port 22 rule) you will also need an OUTPUT –sport rule. Otherwise the server will receive the client request but not be able to reply. This is assuming you do not allow all output.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |