Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17848

Running iptables commands on reboot?

$
0
0

I set up a VPN on my VPS (total money saver since my sites get no hits, lol). [spoiler]It let's me access country X stuff from country Y.[/spoiler]

But if I reboot the server, I have to input two commands to make it work again

iptables -t nat -A POSTROUTING -s 192.168.216.0/24 -o eth0 -j MASQUERADE 

&

iptables -A INPUT -p tcp --dport 1723 -j ACCEPT 

How can I reboot without having to input these codes but have the service work? Thanks.

submitted by okboy
[link] [8 comments]

Viewing all articles
Browse latest Browse all 17848

Trending Articles